import MsgConst from "../../../Common/MsgConst";
import IMsgFilter from "../../../Interface/IMsgFilter";

export default class LoginMsgFilter extends IMsgFilter {
    private static _instance: LoginMsgFilter = null;

    public static get instance() {
        if (this._instance === null) {
            this._instance = new this();
        }
        return this._instance;
    }

    public onFilterMessage(msgID: number, buf: any): any {
        let ret = null;
        switch (msgID) {
            case MsgConst.LOGIN:
                ret = buf;
                break;
        }
        return ret;
    }
}